package org.kailu.book.entity;
// default package
// Generated Jun 2, 2014 10:09:11 AM by Hibernate Tools 4.0.0

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Proxy;

/**
 * Export generated by hbm2java
 */
@Entity
@Proxy(lazy=false)
@Table(name = "export", catalog = "book")
public class ExportEntity implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer exportId;
	private DepartmentEntity department;
	private Date exportDate;
	private int verify;
	
	@Column(name = "verify", length = 1)
	public int getVerify() {
		return verify;
	}

	public void setVerify(int verify) {
		this.verify = verify;
	}

	private Set<ExportStationeryDetailsEntity> exportStationeryDetailses = new HashSet<ExportStationeryDetailsEntity>(
			0);
	private Set<ExportBookDetailsEntity> exportBookDetailses = new HashSet<ExportBookDetailsEntity>(
			0);

	public ExportEntity() {
	}
	
	public ExportEntity( DepartmentEntity departmentEntity, Date date, int verify) {
		this.department = departmentEntity;
		this.exportDate = date;
		this.verify = verify;
	}

	public ExportEntity(DepartmentEntity department, Date exportDate,
			Set<ExportStationeryDetailsEntity> exportStationeryDetailses,
			Set<ExportBookDetailsEntity> exportBookDetailses) {
		this.department = department;
		this.exportDate = exportDate;
		this.exportStationeryDetailses = exportStationeryDetailses;
		this.exportBookDetailses = exportBookDetailses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "export_id", unique = true, nullable = false)
	public Integer getExportId() {
		return this.exportId;
	}

	public void setExportId(Integer exportId) {
		this.exportId = exportId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "department_id")
	public DepartmentEntity getDepartment() {
		return this.department;
	}

	public void setDepartment(DepartmentEntity department) {
		this.department = department;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "export_date", length = 10)
	public Date getExportDate() {
		return this.exportDate;
	}

	public void setExportDate(Date exportDate) {
		this.exportDate = exportDate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "export")
	public Set<ExportStationeryDetailsEntity> getExportStationeryDetailses() {
		return this.exportStationeryDetailses;
	}

	public void setExportStationeryDetailses(
			Set<ExportStationeryDetailsEntity> exportStationeryDetailses) {
		this.exportStationeryDetailses = exportStationeryDetailses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "export")
	public Set<ExportBookDetailsEntity> getExportBookDetailses() {
		return this.exportBookDetailses;
	}

	public void setExportBookDetailses(
			Set<ExportBookDetailsEntity> exportBookDetailses) {
		this.exportBookDetailses = exportBookDetailses;
	}

}
